package com.woniuxy.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
/**
 * @description: TODO
 * @author Time tilt
 * @date 2022/8/26 15:39
 * @version 1.0
 */
@Component
public class HelloWorld {
    @Value("${my-idea.message-num}")
    private String messageNum;

    public void setMessage(String message) {
        this.messageNum = message;
    }

    /* @Bean 类似之前的
    <bean id="doChinese下面方法名" class="com.woniuxy.utils.Chinese下面方法的返回值！！！">
         <args-constructor name="name" value =“我爱中国”/>
    </bean>*/
    @Bean
    public Chinese doChinese(){
        return new Chinese(messageNum);
    }


}
